<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>class 的继承</title>
</head>
<body>
  <script>
    class Point {
      constructor (x,y){
        this.x =x;
        this.y =y;
      }
      toString (){
        return '('+ this.x+','+ this.y+')'
      }
    }
    class ColorPoint extends Point {
      constructor(x,y,color){
        super(x,y)
        console.log(this)
        this.color = clolor
      }
    }

    var  a = new ColorPoint (1,2)
  </script>
</body>
</html>